import request from '@/utils/request'

/** \
 * 获取-权限点列表
 */
export const getUserInfoAPP = () => {
  return request({
    url: '/sys/permission'
  })
}

/**
 * 删除功能
 */
export const deleteAPIList = (id) => {
  return request({
    method: 'delete',
    url: `/sys/permission/${id}`
  })
}
/**
 * 新增
 */
export const addPremissAPI = (data) => {
  return request({
    method: 'post',
    url: '/sys/permission',
    data
  })
}

// 获取权限详情
export function getPermissionDetailApi(id) {
  return request({
    method: 'get',
    url: `/sys/permission/${id}`
  })
}

// 更新权限
export function updatePermissionApi(data) {
  return request({
    method: 'put',
    url: `/sys/permission/${data.id}`,
    data
  })
}
